import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2023-03-15
 * Time: 14:32
 */
public class Test03 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNext()) {
            int A = scan.nextInt();
            int B = scan.nextInt();
            UnusualAdd unusualAdd = new UnusualAdd();
            System.out.println(unusualAdd.addAB(A, B));
        }
    }
}
class UnusualAdd {
    public int addAB(int A, int B) {
        int a = A^B;
        int b = A&B;
        while (b != 0){
            b = b << 1;
            int c = a;
            a = a ^ b;
            b = c & b;
        }
        return  a;
    }





//    public int addAB(int A,int B){
//        if(A == 0) return B;
//        if(B == 0) return A;
//        int a = A ^ B;
//        int b = (A & B) << 1;
//        return addAB(a,b);
//    }
//   public int addAB(int a, int b) {
//       int ans = a^b;
//       int carry = a&b;
//       while (carry!=0){
//          carry=carry<<1;
//          int cur =ans;
//          ans=ans^carry;
//          carry=carry&cur;
//       }
//     return ans;
//  }
}